<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>Cadastro de Clientes</title>
</h:head>
<h:body>
	<h1>Cadastro de Clientes</h1>
	<h:form>
		<p:messages id="messages" autoUpdate="true" closable="true" />
		<h:panelGrid columns="2">
			<p:outputLabel value="Nome:" for="nome" />
			<p:selectOneMenu id="nome" value="#{pessoaBean.cliente.nome}"
				required="true">
				<f:selectItems value="#{pessoaBean.nomeValues}" var="nome"
					itemValue="#{nome}" itemLabel="#{nome.descricao}" />
			</p:selectOneMenu>

			<p:outputLabel value="CPF:" for="cpf" />
			<p:inputText id="cpf" value="#{pessoaBean.cliente.cpf}"
				required="true" />

			<p:commandButton value="Inserir Cliente"
				action="#{pessoaBean.inserirCliente}" />
			<p:commandButton value="Voltar" action="ClientesList"
				immediate="true" />
		</h:panelGrid>
	</h:form>

</h:body>
</html>